<?php

use Illuminate\Support\Facades\DB;
use App\Tools\Common;


$router = app('router');

$router->get('upload', function () {
    return 'upload';
});

// $router->get('upload/test', 'Packages\Upload\Http\Controllers\Admin\UploadController@getAliOSSPolicy');

// oss 管理
$router->group(['namespace' => 'Packages\Upload\Http\Controllers\Admin', 'prefix' => 'api/common'], function () use ($router) {
    $router->post('/oss/sign', 'UploadController@getAliOSSPolicy');

    $router->post('/file/list', 'UploadController@getOssList');
    $router->post('/file/del', 'UploadController@delOssFile');
});

$router->group(['namespace' => 'Packages\Upload\Http\Controllers\Client', 'prefix' => 'web/common'], function () use ($router) {
    $router->post('/oss/sign', 'UploadController@getAliOSSPolicy');
});
